<!-- $Id: brand_info.htm 14216 2008-03-10 02:27:21Z testyang $ -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>ECSHOP 管理中心 - 添加品牌 </title>
<meta name="robots" content="noindex, nofollow">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="{{asset('admin/Styles/general.css')}}" rel="stylesheet" type="text/css" />
<link href="{{asset('admin/Styles/main.css')}}" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="/admin/js/utils.js"></script>
    <script type="text/javascript" src="/admin/js/jquery.js"></script>
    <script type="text/javascript" src="/admin/js/selectzone.js"></script>
    <script type="text/javascript" src="/admin/js/colorselector.js"></script>
    <script type="text/javascript" src="/admin/js/calendar.php?lang="></script>
</head>
<body>
<h1>
    <span class="action-span"><a href="{{url('manager/brandidet',$data->brand_id)}}">商品品牌</a></span>
    <span class="action-span1"><a href="#">ECSHOP 管理中心</a></span>
    <span id="search_id" class="action-span1"> - 添加品牌 </span>
    <div style="clear:both"></div>
</h1>
@if(count($errors)>0)
    @if(is_object($errors))
        @foreach($errors->all() as $error)
            <li>{{$error}}</li>
        @endforeach
    @else
        <li>$errors</li>
    @endif
@endif
<div class="main-div">
    <form method="post" action="{{url('manager/brandidet',$data->brand_id)}}"enctype="multipart/form-data" >
        {{csrf_field()}}
        <table cellspacing="1" cellpadding="3" width="100%">
            <tr>
                <td class="label">品牌名称</td>
                <td>
                    <input type="text" name="brand_name" maxlength="60" value="{{$data->brand_name}}" />
                    <span class="require-field">*</span>
                </td>
            </tr>
            <tr>
                <td class="label">品牌标题</td>
                <td>
                    <input type="text" name="brand_title" maxlength="60" size="40" value="{{$data->brand_title}}" />
                </td>
            </tr>

            <tr>
                <td class="label">品牌网址</td>
                <td>
                    <input type="text" name="brand_url" maxlength="60" size="40" value="{{$data->brand_url}}" />
                </td>
            </tr>

            <tr>
                <td class="label"> 商品原图</td>
                    <!--上传代码开始-->
                <td>
                    <input type="text" size="50" name="brand_thumb" value="{{$data->brand_thumb}}">
                    <input id="file_upload" name="file_upload" type="file" multiple="true">
                    <script src="{{asset('org/uploadify/jquery.uploadify.min.js')}}" type="text/javascript">
                    </script>
                    <link rel="stylesheet" type="text/css" href="{{asset('org/uploadify/uploadify.css')}}">
                    <script type="text/javascript">
                        <?php $timestamp = time();?>
                        $(function() {
                            $('#file_upload').uploadify({
                                'buttonText' : '图片上传',
                                'formData'     : {
                                    'timestamp' : '<?php echo $timestamp;?>',
                                    '_token'     : "{{csrf_token()}}"
                                },
                                'swf'      : "{{asset('org/uploadify/uploadify.swf')}}",
                                'uploader' : "{{url('manager/uploadify')}}",
                                'onUploadSuccess' : function(file, data, response) {
                                    $('input[name=brand_thumb]').val(data);
                                    $('#brand_thumb').attr('src','/'+data );
                                }
                            });
                        });
                    </script>
                    <style>
                        .uploadify{display:inline-block;}
                        .uploadify-button{border:none; border-radius:5px; margin-top:8px;}
                        table.add_tab tr td span.uploadify-button-text{color: #FFF; margin:0;}
                    </style>
                    <tr>
                        <td class="label">缩略图：</td>
                        <td>
                            <img   src ="{{asset($data->brand_thumb)}}"id="brand_thumb" alt="" style="width: 480px; height:200px;">
                        </td>
                    </tr>
                    <!--上传代码结束-->
                </td>
            </tr>


            <tr>
                <td class="label">品牌描述</td>
                <td>
                    <textarea  name="brand_desc" cols="60" rows="4"  >{{$data->brand_desc}}</textarea>
                </td>
            </tr>
            <tr>
                <td class="label">排序</td>
                <td>
                    <input type="text" name="sort_order" maxlength="40" size="15" value="50" />
                </td>
            </tr>
            <tr>
                <td colspan="2" align="center"><br />
                    <input type="submit" class="button" value=" 确定 " />
                    <input type="reset" class="button" value=" 重置 " />
                </td>
            </tr>
        </table>
    </form>
</div>

</body>
</html>